home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / comm / mebbs / pgsys101.lha / rexx / PAGE.REXX next >
OS/2 REXX Batch file  |  1994-09-04  |  5KB  |  243 lines

  1. /* Auto Pager Chat  v.020 by ya thats right Joe's Back at UnderWorld Productions */
  2. signal on ERROR
  3. parse arg LineNumber
  4. options results
  5. DoorName = "RXLogon"
  6. author = "Lost Cause"
  7. if( ~show( 'l', "mebbsarexx.library" ) )then do
  8.    if( ~addlib( "mebbsarexx.library", 0, -30, 0 ) )then do
  9.       say "Could not open library"
  10.       exit 10
  11.    end
  12. end
  13. if ~show('L','rexxsupport.library') then do
  14. if addlib('rexxsupport.library',0,-30,0) then nop
  15. else do
  16. exit 10
  17. end
  18. end
  19. call GetVar DoorName,LineNumber,1
  20. UserName = result
  21. call GetVar DoorName,LineNumber,2
  22. password=result
  23. call GetVar Doorname,LineNumber,3
  24. Address = result
  25. call GetVar Doorname,LineNumber,4
  26. City = result
  27. call GetVar Doorname,LineNumber,5
  28. State = result
  29. call GetVar DoorName,LineNumber,7
  30. telephone=result
  31. call GetVar Doorname,LineNumber,8
  32. Grafx = result
  33. call GetVar Doorname,LineNumber,11
  34. NumCall = result
  35. call GetVar Doorname,LineNumber,20
  36. Accesslvl = result
  37. call GetVar Doorname,LineNumber,21
  38. Handle = result
  39. call open cfg, ('MEBBSNET:CONFIGFILES/LOGON.CFG'), 'R'
  40.    BBSNAME=readln(cfg)
  41.    SYSOP=readln(cfg)
  42.    SYSOPHAND=readln(cfg)
  43.    MAINPTH=readln(cfg)
  44.    VU1FN=readln(cfg)
  45.    HSTORY=readln(cfg)
  46.    PREFIX=readln(cfg)
  47.    LASTXONT=readln(cfg)
  48.    SECURONT=readln(cfg)
  49.    AUTOVALUP=readln(cfg)
  50.    SPECIALCALL=readln(cfg)
  51.    ADTIME=readln(cfg)
  52.    IVALIDU=readln(cfg)
  53.    IIVALIDU=readln(cfg)
  54. call close cfg
  55. call grfxck
  56. b=0
  57. call open(muzak,MAINPTH'Page.Music', 'R')
  58. do until b=48
  59. b=b+1
  60. mzk.b=upper(readln(muzak))
  61. end
  62. call close(muzak)
  63. c=0
  64. call open(strng,MAINPTH'page.string', 'R')
  65. do until c=26
  66. c=c+1
  67. str.c=readln(strng)
  68. end
  69. call close(strng)
  70. DAY=UPPER(LEFT(DATE(w),3))
  71. TIMEN=upper(left(time(m),5))
  72. a=0
  73. call open(pgectrl,MAINPTH'page.'DAY, 'R')
  74. do until a=48
  75. a=a+1
  76. opt.a=upper(left(readln(pgectrl),1))
  77. end
  78. call close(pgectrl)
  79. NMBR=left(TIMEN/30,2)
  80. NMBR=compress(NMBR,'.')
  81. call window
  82. string=str.1
  83. call output
  84. string=str.2
  85. call output
  86. call blank
  87.  
  88. call open(setting,MAINPTH'Page.cfg', 'R')
  89. nqmb=readln(setting)
  90. answ=upper(readln(setting))
  91. joke=upper(readln(setting))
  92. call close(setting)
  93.  
  94. if answ='N' then signal Quack
  95. signal lists
  96.  
  97. lists:
  98. call open(lsts,MAINPTH'Page.Users','R')
  99. do while EOF(lsts) = 0
  100. name=upper(readln(lsts))
  101. if upper(NAME) = upper(USERNAME) then signal spaging
  102. end
  103. signal squack
  104.  
  105. spaging:
  106. call close(lsts)
  107. signal paging
  108.  
  109. squack:
  110. call close(lsts)
  111. signal quack
  112.  
  113. quack:
  114. if nqmb='1' then signal Paging
  115. if nqmb='2' then signal work
  116. if nqmb='3' then signal autopage
  117.  
  118. work:
  119. if opt.nmbr='Y' then signal Paging
  120. signal autopage
  121.  
  122. paging:
  123. address command mzk.nmbr
  124. d1=str.25*50
  125. call delay(d1)
  126. string=normal||str.3
  127. call output
  128. string=normal||str.4
  129. call getkey
  130. address command mzk.nmbr
  131. signal getout
  132.  
  133. autopage:
  134. d2=str.26*50
  135. call delay(d2)
  136. call blank
  137. if joke='Y' then signal jokepg
  138. signal normpage
  139.  
  140. normpage:
  141. string=normal||str.5 ;call output
  142. string=Normal||str.4
  143. call getkey
  144. signal getout
  145.  
  146. jokepg:
  147. string=normal||str.6 ;call output ;call delay(75)
  148. string=MAGENTA||str.7 ;call msg ;call delay(5)
  149. string=str.8 ;call msg ;call delay(18)
  150. string=str.9 ;call msg ;call delay(34)
  151. string=str.10 ;call msg ;call delay(27)
  152. string=str.11 ;call msg ;call delay(41)
  153. string=str.12 ;call msg ;call delay(10)
  154. string=str.13 ;call msg ;call delay(12)
  155. string=str.14 ;call msg ;call delay(33)
  156. string=str.15 ;call msg ;call delay(29)
  157. string=str.16 ;call msg ;call delay(14)
  158. string=str.17 ;call msg ;call delay(11)
  159. string=str.18 ;call msg ;call delay(9)
  160. string=str.19 ;call msg ;call delay(25)
  161. string=str.20 ;call msg ;call delay(30)
  162. string=str.21 ;call msg ;call delay(13)
  163. string=str.22 ;call msg ;call delay(4)
  164. string=str.23 ;call msg ;call delay(18)
  165. string="" ;call output
  166. string=GREEN""
  167. length='78'
  168. call input
  169. string=STS||normal||STS
  170. call output
  171. call delay(50)
  172. string=sts||Magenta||str.24||sts
  173. call output
  174. call delay(100)
  175. string=normal||str.5
  176. call output
  177. call blank
  178. string=Normal||str.4
  179. call getkey
  180. signal getout
  181.  
  182. BLANK:
  183. string = " "
  184. call output
  185. return
  186.  
  187. CARRIER:
  188. call CDetect doorname,linenumber
  189. cd=upper(result)
  190. if cd="NO CARRIER!" then signal error
  191. return
  192.  
  193. ERROR:
  194. call Exit_Door DoorName,LineNumber
  195. exit 10
  196.  
  197. GETKEY:
  198. call hotkey Doorname,LineNumber,String
  199. hot=result
  200. call carrier
  201. Return
  202.  
  203. GETOUT:
  204. call Exit_Door DoorName,LineNumber
  205. exit 0
  206.  
  207. GRFXCK:
  208. IF Grafx = 0 THEN DO
  209.     red = '' ;green = '' ;yellow = '' ;Byellow = '' ;blue = '' ;magenta = ''
  210.         cyan = '' ;Bcyan = '' ;white = '' ;Bwhite = '' ;italics = '' ;bold = ''
  211.     normal = '' ;cls = '0C'x ;yes_no = '(y/N)' ;no_yes = '(Y/n)' ;skip = 'H'
  212.     sts="" ;END
  213. ELSE DO
  214.     red = '' ;green = '' ;yellow = '' ;Byellow = ''
  215.         blue = '' ;magenta = '' ;cyan = '' ;Bcyan = ''
  216.         white = '' ;Bwhite = '' ;italics = '' ;bold = ''
  217.     normal = '' ;cls = '0C'x||'' 
  218.     yes_no = white"("blue"y"white"/"red"N"white")"
  219.     no_yes = white"("red"Y"white"/"blue"n"white")" ;skip = 'H'
  220.     sts='' ;END
  221. return
  222.  
  223. INPUT:
  224. call Prompt doorname,linenumber,string,length
  225. typed=result
  226. call carrier
  227. return
  228.  
  229. MSG:
  230. call message DoorName,LineNumber,String,0
  231. Return
  232.  
  233. OUTPUT:
  234. call message doorname,linenumber,string,1
  235. call carrier
  236. return
  237.  
  238. WINDOW:
  239. if exists(MAINPTH||page.txt) then do
  240. call readgra Doorname,LineNumber,MAINPTH"page"
  241. end
  242. Return
  243.